<?php
print "<div class=\"user_login\">\n";

if($this->app->getUser()->isAnonymous()) {
    
    
    
    print "<div class=\"content\">\n";
    
    $coll = new Led_Entity_Collection($this->entity->app_id, null, 0, 2, $this->entity->id, 82);
    print $coll->render();
        
    print "</div>\n";
    
    print "<div class=\"inputs\">";

    print "<form name=\"user\" action=\"/xtranetlogin/login\" method=\"post\">\n";
   
    print Lead_Markup_Xhtml_Form::textInput('login', 'login', null, null, $this->entity->logintext);
    
    print Lead_Markup_Xhtml_Form::passwordInput('password', 'password', null, null, $this->entity->passwordtext);
    
    print "<span class=\"clearer\"></span>";

    ?>
    
    <button type="submit"><?php print $this->entity->loginbuttontext; ?></button>
    
    
    <?php
    
    print "</form>\n";
    
    print "</div>\n";
    
} else {
    print "<div class=\"content\">\n";
    
    $coll = new Led_Entity_Collection($this->entity->app_id, null, 0, 2, $this->entity->id, 83);
    print $coll->render();
    
        
    print"</div>\n";
    
    print "<div class=\"inputs\">";
        
    print "<form name=\"user\" action=\"/xtranetlogin/logout\" method=\"post\">\n";
        
    print "<div class=\"logged\">";
    print $this->entity->loggedtext  . $this->app->getUser()->firstname . ' ' . $this->app->getUser()->surname;
    print"</div>\n";
    
    print "<span class=\"clearer\"></span>";
    ?>
    <button type="submit"><?php print $this->entity->logoutbuttontext; ?></button>
    <?php
        
    print "</form>\n";


    print"</div>\n";


}



print "</div>\n";
